package com.util;

import com.exception.ServiceException;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component
public class MyValid {
    public static void isIll(Boolean flag,String message){
        if(flag)
            throw new IllegalArgumentException(message);
    }

    public static void isService(Boolean flag,String message){
        if(flag)
            throw new ServiceException(message);
    }
}
